package com.luojialong.model.vo.scoreTb;

import cn.hutool.json.JSONUtil;
import com.luojialong.model.domain.ProjectTb;
import com.luojialong.model.domain.ScoreTb;
import com.luojialong.model.vo.projectTb.ProjectTbInfoVo;
import com.luojialong.utils.TimeUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ScoreTbInfoVo implements Serializable {

    private static final long serialVersionUID = 188006568611843557L;

    /**
     * 项目打分的表id
     */
    private Long id;

    /**
     * 教学设计的分数
     */
    private Integer teachgrade;

    /**
     * 教学实施的分数
     */
    private Integer implementGrade;

    /**
     * 教学影响的分数
     */
    private Integer effectGrade;

    /**
     * 特色创新分数
     */
    private Integer devGrade;

    /**
     * 评审意见
     */
    private String description;

    /**
     * 项目的Id
     */
    private Long projectId;

    /**
     * 创建时间
     */
    private String createTime;


    /**
     * 评审专家的id
     */
    private Long userId;

    /**
     * 总分数
     */
    private Integer sumScore;


    public static ScoreTbInfoVo transferVo(ScoreTb scoreTb) {
        if (scoreTb == null) {
            return null;
        }
        ScoreTbInfoVo scoreTbInfoVo = new ScoreTbInfoVo();
        BeanUtils.copyProperties(scoreTb, scoreTbInfoVo);
        scoreTbInfoVo.setCreateTime(TimeUtils.transferDateFormat(scoreTb.getCreateTime()));
        return scoreTbInfoVo;
    }

}
